<script>
if (window.testRunner)
    testRunner.dumpAsText();
</script>
<iframe
  sandbox="allow-scripts"
  srcdoc="
<script>
  window.name = 'alert';
  try {
    top.alert;
    console.log('FAIL');
    console.log('compatible with old versions = ' + (top.alert === window));
  } catch (e) {
    console.log(e.toString());
  }
</script>"
></iframe>
